package com.mioto.ld.exception;

import com.mioto.ld.result.ResultData;
import com.mioto.ld.result.SystemTip;

/**
 * @author mioto-qinxj
 * @date 2024/4/11
 * @desc 自定义异常
 */
public class BasicException extends RuntimeException{

    private SystemTip systemTip;

    public BasicException(String message) {
        super(message);
    }

    public BasicException(SystemTip systemTip) {
        this.systemTip = systemTip;
    }

    public ResultData toResultData() {
        return ResultData.result(systemTip);
    }
}
